package work20241122;

import java.util.Scanner;

/**
 * @author zdl
 * @date 2024/11/22
 */
public class Demo2 {
    public static void main(String[] args) {
        /**
         *  i=1 1<10 true
         *      j=1 1<=1 sout(1*1=1) j++
         *      j=2 2<=1 false  换行  i++
         *  i=2 2<10 true
         *      j=1 1<=2 true sout(1*2=2 ) j++
         *      j=2 2<=2 true sout(2*2=4) j++
         *      j=3 3<=2 false  换行  i++
         *  i=3  3<10 true
         *      j=1 1<=3 true sout(1*3=3) j++
         *      j=2 2<=3 true sout(2*3=6)  j++
         *      j=3 3<=3 true sout(3*3=9) j++
         *      j=4 4<=3 false 换行  i++
         *  ...........
         *  i=9 9<10 true
         *      j=1 1<=9 true sout(1*9=9)  j++
         *      j=2 2<=9 true sout(2*9=18)  j++
         *      j=3 3<=9 true sout(3*9=27)  j++
         *      j=4 4<=9 true sout(4*9=36)  j++
         *      j=5 5<=9 true sout(5*9=45)  j++
         *      j=6 6<=9 true sout(6*9=54)  j++
         *      j=7 7<=9 true sout(7*9=63)  j++
         *      j=8 8<=9 true sout(8*9=72)  j++
         *      j=9 9<=9 true sout(9*9=81)  j++
         *      j=10 10<=9 false  换行  i++
         *  i=10 10<10 false
         */
        for (int i = 1; i < 10; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + "=" + j * i + "\t");
            }
            System.out.println();
        }
    }
}
